import {METHOD} from './config.js'
import {sendRequest, userUrl} from './base.js'

// 获取个人资料
const USER_INFO = 'f/userInfo'

const USER_MODIFY_PWD = 'f/modifyPwd'

/**
 * 获取个人资料
 * @param params
 * @returns {*}
 */
export function userInfo(params) {
  return sendRequest(userUrl(USER_INFO), params)
}

/**
 * 修改密码
 * @param params
 * utoken:utoken,
 * oldPwd:123456,
 * pwd:111111
 * @returns {*}
 */
export function modifyPwd(params) {
  return sendRequest(userUrl(USER_MODIFY_PWD), params, METHOD.POST)
}
